package com.hai.loggerdemo.controller;

import com.hai.loggerdemo.service.HelloService;
import com.hai.loggerdemo.service.World;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@Controller
public class DemoLogger {
    private static final Logger logger = LoggerFactory.getLogger(DemoLogger.class);
    @Autowired
    private HelloService helloService;
    @Autowired
    private World world;
    @GetMapping("/hello")
    public String hello(){
        logger.info("我是新的项目");
        return "/love/index";
    }

}
